package com.dinpay.plugin.activity;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.graphics.Color;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.View.OnClickListener;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import com.dinpay.plugin.b.a;
import com.dinpay.plugin.c.a.a;
import com.dinpay.plugin.d.i;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class BankCardListActivity extends DinpayBaseActivity
  implements Serializable
{
  private ListView a = null;
  private com.dinpay.plugin.a.b b = null;
  private List c = null;
  private com.dinpay.plugin.b.b d = null;
  private a e = null;
  private TextView f;
  private TextView g;
  private boolean h = true;
  private boolean i = true;
  private LinearLayout j;
  private LinearLayout k;
  private String l;
  private List m;
  private View.OnClickListener n = new b(this);
  private AdapterView.OnItemClickListener o = new c(this);

  private void c()
  {
    if (getIntent() != null)
    {
      this.c = ((List)getIntent().getSerializableExtra("bankNameList"));
      this.l = getIntent().getStringExtra("isSelect");
    }
    this.m = new ArrayList();
    if (this.c != null)
      for (int i1 = 0; i1 < this.c.size(); i1++)
        if (((com.dinpay.plugin.b.b)this.c.get(i1)).c().equals("1"))
          this.m.add(((com.dinpay.plugin.b.b)this.c.get(i1)).d());
    if (this.b != null)
      this.b = null;
    if (this.m.size() > 0)
    {
      this.b = new com.dinpay.plugin.a.b(this.m, this);
      this.a.setAdapter(this.b);
    }
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    int i1 = (int)(0.5F + 30.0F * getResources().getDisplayMetrics().density);
    int i2 = (int)(0.5F + 240.0F * getResources().getDisplayMetrics().density);
    int i3 = (int)(0.5F + 120.0F * getResources().getDisplayMetrics().density);
    LinearLayout.LayoutParams localLayoutParams1 = new LinearLayout.LayoutParams(-1, -1);
    localLayoutParams1.gravity = 17;
    LinearLayout localLinearLayout1 = new LinearLayout(this);
    localLinearLayout1.setLayoutParams(localLayoutParams1);
    localLinearLayout1.setOrientation(1);
    localLinearLayout1.setBackgroundColor(Color.parseColor("#f2f2f2"));
    RelativeLayout localRelativeLayout = new RelativeLayout(this);
    localRelativeLayout.setBackgroundDrawable(i.a(getResources(), BankCardListActivity.class, a.a.n));
    localRelativeLayout.setLayoutParams(new LinearLayout.LayoutParams(-1, (int)(0.5F + 40.0F * getResources().getDisplayMetrics().density)));
    RelativeLayout.LayoutParams localLayoutParams2 = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams2.addRule(9);
    localLayoutParams2.addRule(15);
    localLayoutParams2.leftMargin = 10;
    ImageView localImageView1 = new ImageView(this);
    localImageView1.setScaleType(ImageView.ScaleType.CENTER);
    localImageView1.setAdjustViewBounds(true);
    localImageView1.setPadding(15, 10, 0, 10);
    localImageView1.setId(200001);
    localImageView1.setBackgroundDrawable(i.a(getResources(), BankCardListActivity.class, a.a.i));
    localImageView1.setOnClickListener(this.n);
    RelativeLayout.LayoutParams localLayoutParams3 = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams3.addRule(13);
    TextView localTextView = new TextView(this);
    localTextView.setText("支持银行列表");
    localTextView.setTextSize(18.0F);
    localTextView.setTextColor(Color.parseColor("#FFFFFF"));
    localTextView.setId(1000002);
    localTextView.setGravity(17);
    RelativeLayout.LayoutParams localLayoutParams4 = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams4.addRule(11);
    localLayoutParams4.addRule(15);
    localLayoutParams4.rightMargin = 10;
    ImageView localImageView2 = new ImageView(this);
    localImageView2.setScaleType(ImageView.ScaleType.CENTER);
    localImageView2.setAdjustViewBounds(true);
    localImageView2.setId(100001);
    localImageView2.setBackgroundDrawable(i.a(getResources(), BankCardListActivity.class, a.a.m));
    localRelativeLayout.addView(localImageView1, localLayoutParams2);
    localRelativeLayout.addView(localTextView, localLayoutParams3);
    localRelativeLayout.addView(localImageView2, localLayoutParams4);
    localLinearLayout1.addView(localRelativeLayout);
    LinearLayout.LayoutParams localLayoutParams5 = new LinearLayout.LayoutParams(i2, i3);
    localLayoutParams5.topMargin = i1;
    localLayoutParams5.bottomMargin = i1;
    localLayoutParams5.leftMargin = i1;
    localLayoutParams5.rightMargin = i1;
    localLayoutParams5.gravity = 1;
    LinearLayout localLinearLayout2 = new LinearLayout(this);
    localLinearLayout2.setOrientation(0);
    localLinearLayout2.setPadding(0, 10, 0, 10);
    LinearLayout.LayoutParams localLayoutParams6 = new LinearLayout.LayoutParams(-2, -2);
    localLayoutParams6.gravity = 17;
    localLayoutParams6.setMargins(10, 10, 0, 10);
    localLayoutParams6.weight = 1.0F;
    LinearLayout.LayoutParams localLayoutParams7 = new LinearLayout.LayoutParams(-2, -2);
    localLayoutParams7.gravity = 17;
    localLayoutParams7.setMargins(10, 10, 0, 10);
    localLayoutParams7.weight = 1.0F;
    this.f = new TextView(this);
    this.f.setGravity(17);
    this.f.setTextSize(18.0F);
    this.f.setTextColor(Color.parseColor("#4EC7F3"));
    this.f.setText("信用卡");
    this.f.setId(100002);
    this.f.setOnClickListener(this.n);
    this.g = new TextView(this);
    this.g.setGravity(17);
    this.g.setTextSize(18.0F);
    this.g.setTextColor(Color.parseColor("#ff50494a"));
    this.g.setText("储蓄卡");
    this.g.setId(100003);
    this.g.setOnClickListener(this.n);
    localLinearLayout2.addView(this.f, localLayoutParams6);
    localLinearLayout2.addView(this.g, localLayoutParams7);
    localLinearLayout1.addView(localLinearLayout2);
    LinearLayout.LayoutParams localLayoutParams8 = new LinearLayout.LayoutParams(-1, -2);
    LinearLayout localLinearLayout3 = new LinearLayout(this);
    localLinearLayout3.setOrientation(0);
    this.j = new LinearLayout(this);
    this.j.setOrientation(0);
    this.j.setLayoutParams(localLayoutParams8);
    this.j.setBackgroundColor(Color.parseColor("#4EC7F3"));
    this.k = new LinearLayout(this);
    this.k.setOrientation(0);
    this.k.setLayoutParams(localLayoutParams8);
    this.k.setBackgroundColor(Color.parseColor("#4EC7F3"));
    this.k.setVisibility(4);
    LinearLayout.LayoutParams localLayoutParams9 = new LinearLayout.LayoutParams(50, 1);
    localLayoutParams9.weight = 1.0F;
    LinearLayout.LayoutParams localLayoutParams10 = new LinearLayout.LayoutParams(50, 1);
    localLayoutParams10.weight = 1.0F;
    localLinearLayout3.addView(this.j, localLayoutParams9);
    localLinearLayout3.addView(this.k, localLayoutParams10);
    localLinearLayout1.addView(localLinearLayout3);
    LinearLayout localLinearLayout4 = new LinearLayout(this);
    localLinearLayout4.setOrientation(0);
    LinearLayout.LayoutParams localLayoutParams11 = new LinearLayout.LayoutParams(-1, 1);
    localLinearLayout4.setId(20001);
    ImageView localImageView3 = new ImageView(this);
    localImageView3.setBackgroundColor(Color.parseColor("#ffc8c8cb"));
    localLinearLayout4.addView(localImageView3, localLayoutParams11);
    localLinearLayout1.addView(localLinearLayout4);
    LinearLayout.LayoutParams localLayoutParams12 = new LinearLayout.LayoutParams(-1, -2);
    LinearLayout localLinearLayout5 = new LinearLayout(this);
    localLinearLayout5.setLayoutParams(localLayoutParams12);
    localLinearLayout5.setOrientation(0);
    localLinearLayout5.setBackgroundDrawable(i.a(getResources(), DinpayPayActivity.class, a.a.p));
    this.a = new ListView(this);
    this.a.measure(-1, -2);
    this.a.setPadding(5, 0, 5, 0);
    this.a.setCacheColorHint(Color.parseColor("#00000000"));
    String str = getSharedPreferences("bankList", 1).getString("isSelect", "");
    if ((str.equals("0")) && (str != null))
      this.a.setOnItemClickListener(this.o);
    localLinearLayout1.addView(this.a);
    setContentView(localLinearLayout1);
    c();
    ExitApplication.a().a(this);
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.dinpay.plugin.activity.BankCardListActivity
 * JD-Core Version:    0.6.2
 */